<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8"
	language="java"%>
<%@ include file="/jsp/platform/include/include.jsp"%>
<html>
<head>
<TITLE><c:out value="${_LOGONUSER_.MANAGETITILE}" />
</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<%@ include file="/jsp/platform/include/header.jsp"%>

	<script type="text/javascript">
	function addBar(){
	    var checkStr = "number|batchCount|生成个数|" + $("#batchCount").val() + ";"
	    if($("#batchCount").val() <= 0){
	    	$.messager.alert("操作提示","至少生成1个二维码！");
	    	return false;
	    }
	    if (!checkAll(checkStr)) {
				return false;
			}
			$.messager.confirm("操作提示", "您确定要执行此操作吗！", function(data) {
				if (data) {
					$("#queryForm").submit();
				}
			});
	}
	function downloadByBatch(batchNo){
	   $("#queryForm").attr("action","<%=request.getContextPath()%>/manage/systemBar/downloadByBatchNo?batchNo="+batchNo);
	   $("#queryForm").submit();
	   $("#queryForm").attr("action","<%=request.getContextPath()%>/manage/systemBar/addByBatchCount");
	}
	function exportByBatch(batchNo){
	   $("#queryForm").attr("action","<%=request.getContextPath()%>/manage/systemBar/exportByBatchNo?batchNo="+batchNo);
	   $("#queryForm").submit();
	   $("#queryForm").attr("action","<%=request.getContextPath()%>/manage/systemBar/addByBatchCount");
	}
	</script>
</HEAD>
<BODY>
	<DIV class="all">
		<%@ include file="/jsp/platform/include/head.jsp"%>
		<%@ include file="/jsp/platform/include/menu.jsp"%>
		<DIV class="mains">
			<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
				<TBODY>
					<TR valign="top">
						<%@ include file="/jsp/platform/include/mainLeft.jsp"%>
						<TD>
							<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
								<TBODY>
									<TR>
										<TD>
											<TABLE width="180" border="0" cellspacing="0" cellpadding="0">
												<TBODY>
													<TR>
														<TD width="7"><IMG width="7" height="36" alt=""
															src="<%=request.getContextPath()%>/images/pages_l.jpg">
														</TD>
														<TD align="center"
															background="<%=request.getContextPath()%>/images/pages_bg.jpg">
															<SPAN class="f_tit1">二维码生成</SPAN>
														</TD>
														<TD width="7"><IMG width="7" height="36" alt=""
															src="<%=request.getContextPath()%>/images/pages_r.jpg">
														</TD>
													</TR>
												</TBODY>
											</TABLE>
										</TD>
									</TR>
								</TBODY>
								<TR>
									<TD>
										<div class="pages_con">
										   <FORM name="queryForm" id="queryForm"
												action="<%=request.getContextPath()%>/manage/systemBar/addByBatchCount"
												method="post">
												<div class="pages_con_20">

													<div class="transaction_external">
														<DIV class="clearfix">
														    <SPAN class="label cz_label "
															style="width: 120px; text-align: right;">生成个数：</SPAN> <INPUT
															name="batchCount"
															class="txtbox_cz txtbox_cz_color input_change"
															id="batchCount" type="easyui-number"
															value="<c:out value='${model.batchCount}'/>">
															<A
																class="btn confirm margin_l_10"
																onClick="javaScript:addBar();"
																href="javascript:void(0);">生成</A>
														</DIV>
													</DIV>
													<br>
														<div class="talbes">
															<table style="text-align: center" width="100%" border="0"
																cellpadding="8" cellspacing="0">
																<tbody>
																	<tr class="talbe_pubs_tr">
																		<td>二维码批次号</td>
																		<td>总记录数</td>
																		<td>生成时间</td>
																		<td>操作</td>
																	</tr>
																	<c:forEach var="model" items="${list}">
																		<tr>
																			<td><c:out value="${model.batchNo}" /></td>
																			<td><c:out value="${model.batchCount}" /></td>
																			<td><fmt:formatDate value="${model.createDate}"
																					pattern="yyyy-MM-dd HH:mm:ss" /></td>
																			<td>
																			<a onClick="javaScript:downloadByBatch('${model.batchNo}');">下载</a>
																			<a onClick="javaScript:exportByBatch('${model.batchNo}');">导出</a>
																			</td>
																		</tr>
																	</c:forEach>
																</tbody>
															</table>
															<jsp:include page="/jsp/platform/include/kkpager.jsp"></jsp:include>
														</div>
												</div>
											</FORM>
										</div> <!--当中内容块结束-->
									</TD>
								</TR>
							</TABLE>
						</TD>
					</TR>
				</TBODY>
			</TABLE>
		</DIV>
		<%@ include file="/jsp/platform/include/foot.jsp"%>
</BODY>
</HTML>
